package com.mega.entityBanning;

import net.minecraftforge.common.ForgeConfigSpec;

import java.util.ArrayList;
import java.util.List;

public class Config {
    public static ForgeConfigSpec COMMON_CONFIG;
    public static ForgeConfigSpec.ConfigValue<List<String>> ENTITY_BANNED_LIST;
    public static ForgeConfigSpec.ConfigValue<List<String>> EFFECT_BANNED_LIST;
    public static ForgeConfigSpec.ConfigValue<List<String>> STRUCTURE_BANNED_LIST;
    public static ForgeConfigSpec.ConfigValue<List<String>> TEXTURE_BANNED_LIST;
    public static ForgeConfigSpec.ConfigValue<List<String>> TEXTURE_NAME_BANNED_LIST;
    public static ForgeConfigSpec.ConfigValue<List<String>> PARTICLE_BANNED_LIST;
    public static ForgeConfigSpec.ConfigValue<List<String>> ITEM_BANNED_LIST;
    public static ForgeConfigSpec.ConfigValue<List<String>> ITEM_ENCHANTMENT_BANNED_LIST;
    public static ForgeConfigSpec.ConfigValue<List<String>> ITEM_CLASS_BANNED_LIST;
    public static ForgeConfigSpec.ConfigValue<List<String>> EXPLOSION_BANNED_LIST;
    public static ForgeConfigSpec.BooleanValue ITEM_BANNED_EMPTY;
    public static ForgeConfigSpec.ConfigValue<List<String>> DIMENSION_BANNED_LIST;
    public static ForgeConfigSpec.ConfigValue<List<String>> SPECIAL_EVENTS_BANNED_LIST;

    static {
        ForgeConfigSpec.Builder COMMON_BUILDER = new ForgeConfigSpec.Builder();
        COMMON_BUILDER.comment("Banned Settings").push("banedList");
        ENTITY_BANNED_LIST = COMMON_BUILDER.define("entityTypes", new ArrayList<>());
        ITEM_BANNED_LIST = COMMON_BUILDER.define("items", new ArrayList<>());
        ITEM_CLASS_BANNED_LIST = COMMON_BUILDER.define("itemClasses", new ArrayList<>());
        PARTICLE_BANNED_LIST = COMMON_BUILDER.define("particleTypes", new ArrayList<>());
        ITEM_ENCHANTMENT_BANNED_LIST = COMMON_BUILDER.define("enchantment", new ArrayList<>());
        EFFECT_BANNED_LIST = COMMON_BUILDER.define("effects", new ArrayList<>());
        STRUCTURE_BANNED_LIST = COMMON_BUILDER.define("structures", new ArrayList<>());
        TEXTURE_BANNED_LIST = COMMON_BUILDER.define("textures", new ArrayList<>());
        TEXTURE_NAME_BANNED_LIST = COMMON_BUILDER.define("texture_names", new ArrayList<>());
        EXPLOSION_BANNED_LIST = COMMON_BUILDER.define("explosionTypes", new ArrayList<>());
        DIMENSION_BANNED_LIST = COMMON_BUILDER.define("dimensions", new ArrayList<>());
        SPECIAL_EVENTS_BANNED_LIST = COMMON_BUILDER.define("special_events", new ArrayList<>());
        COMMON_BUILDER.pop();
        COMMON_BUILDER.comment("Banned Settings").push("ban logic");
        ITEM_BANNED_EMPTY = COMMON_BUILDER.define("isEmpty", false);
        COMMON_BUILDER.pop();
        COMMON_CONFIG = COMMON_BUILDER.build();
    }
}
